<?php
class GBCreatingOrderThread
{
	public function clean()
	{
		$dtOrderManager = new DataTable(constant('DB_TABLE_ORDER_MANAGER'));
		$condition = sprintf("`status` = 'creating' and `modify` < '%s'",date('Y-m-d H:i:s',strtotime("-1 week")));
		$record_list = $dtOrderManager->get_list($condition);
		
		foreach($record_list as $tmpData)
		{
			$dtOrderManager->remove($tmpData['id']);
		}
	}
}
?>